package cn.ac.jaas.isc.vegetable.pbms.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 装置表
 *
 * @author 张高昌
 * @date 2022-05-22 19:51:08
 */
@Data
@TableName("arc_device")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "装置表")
public class ArcDevice extends Model<ArcDevice> {

    private static final long serialVersionUID = 1L;

    /**
     * 装置id
     */
    @TableId
    @ApiModelProperty(value = "装置id")
    private Integer deviceId;

    /**
     * 设备编码
     */
    @ApiModelProperty(value = "设备编码")
    private String equipmentCode;

    /**
     * 装置编码
     */
    @NotBlank(message = "装置编码不能为空")
    @Length(min = 2, max = 30, message = "装置编码必须由2~30个字组成")
    @ApiModelProperty(value = "装置编码")
    private String deviceCode;

    /**
     * 装置识别码
     */
    @ApiModelProperty(value = "装置识别码")
    private String identificationCode;

    /**
     * 装置名称
     */
    @NotBlank(message = "装置名称不能为空")
    @Length(min = 2, max = 30, message = "装置名称必须由2~30个字组成")
    @ApiModelProperty(value = "装置名称")
    private String deviceName;

    /**
     * 装置类型id
     */
    @NotNull(message = "装置类型不能为空")
    @ApiModelProperty(value = "装置类型id")
    private Integer deviceTypeId;

    /**
     * 厂商id
     */
    @ApiModelProperty(value = "厂商id")
    private Integer manufacturerId;

    /**
     * 型号id
     */
    @ApiModelProperty(value = "型号id")
    private Integer modelId;

    /**
     * 装置状态 [1:使用|2:在库|3:报废|4:丢失][arc_device_status]
     */
    @ApiModelProperty(value = "装置状态 [1:使用|2:在库|3:报废|4:丢失][arc_device_status]")
    @NotNull(message = "装置状态不能为空")
    private Integer status;

    /**
     * 启用状态 [0:停用|1:启用][arc_device_run_status]
     */
    @ApiModelProperty(value = "启用状态 [0:停用|1:启用][arc_device_run_status]")
    @NotNull(message = "启用状态不能为空")
    private Integer runStatus;

    /**
     * 网关
     */
    @ApiModelProperty(value = "网关")
    private String gateway;

    /**
     * 指令类型
     */
    @ApiModelProperty(value = "指令类型")
    private Integer instructionType;

    /**
     * 启闭总时间
     */
    @ApiModelProperty(value = "启闭总时间")
    private Integer openCloseTime;

    /**
     * 修正规则[amendment_rules]
     */
    @ApiModelProperty(value = "修正规则[amendment_rules]")
    private Integer amendmentRules;

    /**
     * 修正值
     */
    @ApiModelProperty(value = "修正值")
    private String correctionValue;

    /**
     * 是否删除[0:未删除|1:已删除][sys_del_flag]
     */
    @ApiModelProperty(value = "是否删除[0:未删除|1:已删除][sys_del_flag]")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private Integer updateUser;

}
